package ru.rchervot.sanasar.client.rpc;

import ru.rchervot.sanasar.client.model.ItemObject;
import ru.rchervot.sanasar.client.model.SearchResultsItem;

import com.google.gwt.user.client.rpc.AsyncCallback;

public interface RPCServiceAsync {
//	<T extends Response> void execute(Action action, AsyncCallback<T> callback);
	
	<T extends GetPageResponse<SearchResultsItem>> 
	void execute(GetPage action, AsyncCallback<T> callback);
	
	<T extends GetItemResponse<ItemObject>> 
	void execute(GetItem action, AsyncCallback<T> callback);
	
	<T extends GetQueryResponse>
	void execute(GetQuery action, AsyncCallback<T> callback);
	
	<T extends SaveQueryResponse>
	void execute(SaveQuery action, AsyncCallback<T> callback);
}
